package com.yt.fras;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import springfox.documentation.oas.annotations.EnableOpenApi;

/**
 * @author yt
 */
@SpringBootApplication
@MapperScan("com.yt.fras.mapper")
@EnableOpenApi
@EnableAsync
@EnableCaching
//@EnableScheduling
@ImportResource(locations = {"classpath:captcha/captcha.xml"})
public class FrasApplication {

    public static void main(String[] args) {
        SpringApplication.run(FrasApplication.class, args);
    }


    @Bean({"applicationTaskExecutor"})
    public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
        return new ThreadPoolTaskExecutor();
    }
}
